import request from '@/utils/request'

// 查询异常处理列表
export function listAbnormal(query) {
  return request({
    url: '/snowRemoving/abnormal/list',
    method: 'get',
    params: query
  })
}

// 查询异常处理详细
export function getAbnormal(id) {
  return request({
    url: '/snowRemoving/abnormal/' + id,
    method: 'get'
  })
}

// 新增异常处理
export function addAbnormal(data) {
  return request({
    url: '/snowRemoving/abnormal',
    method: 'post',
    data: data
  })
}

// 修改异常处理
export function updateAbnormal(data) {
  return request({
    url: '/snowRemoving/abnormal',
    method: 'put',
    data: data
  })
}

// 删除异常处理
export function delAbnormal(id) {
  return request({
    url: '/snowRemoving/abnormal/' + id,
    method: 'delete'
  })
}

// 一键修复异常处理
export function handleAbnormal(id) {
  return request({
    url: '/snowRemoving/abnormal/handleAbnormal/' + id,
    method: 'get'
  })
}

// 文件上传
export function upload(data) {
  return request({
    url: '/snowRemoving/abnormal/upload',
    method: 'post',
    data: data
  })
}

// 自行处理
export function handleDiscretion(id) {
  return request({
    url: '/snowRemoving/abnormal/handleDiscretion/' + id,
    method: 'get'
  })
}
